package com.sy.dao;

import com.sy.entity.Userlog;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * @description: 码起 自动生成代码
 * @author: 小毛
 * @create: 2020-11-25 22:00:26
 */
public interface UserlogDao {
    /*新增*/
    @Insert("insert into userlog (uid,flag,content,ctime) values(#{uid},#{flag},#{content},now())")
    int insert(Userlog userlog);

    /*删除*/
    @Delete("delete from userlog where id=#{id}")
    int deleteById(int id);
    /*查询全部*/
    @Select("select * from userlog")
    List<Userlog> all();
}